import request from '@/utils/request'

// 查询安全常识文章列表
export function listknowledgeArticle(query) {
  return request({
    url: '/system/knowledgeArticle/list',
    method: 'get',
    params: query
  })
}

// 查询安全常识文章详细
export function getknowledgeArticle(id) {
  return request({
    url: '/system/knowledgeArticle/' + id,
    method: 'get'
  })
}




// 查询安全常识文章目录
export function getMlList() {
  return request({
    url: '/system/knowledgeArticle/getMlList',
    method: 'get'
  })
}

// 新增安全常识文章
export function addknowledgeArticle(data) {
  data.content=encodeURIComponent(data.content)
  return request({
    url: '/system/knowledgeArticle',
    method: 'post',
    data: data
  })
}

// 修改安全常识文章
export function updateknowledgeArticle(data) {
  data.content=encodeURIComponent(data.content)
  return request({
    url: '/system/knowledgeArticle',
    method: 'put',
    data: data
  })
}

// 删除安全常识文章
export function delknowledgeArticle(id) {
  return request({
    url: '/system/knowledgeArticle/' + id,
    method: 'delete'
  })
}

// 导出安全常识文章
export function exportknowledgeArticle(query) {
  return request({
    url: '/system/knowledgeArticle/export',
    method: 'get',
    params: query
  })
}